﻿<Window x:Class="Anagramme.Views.MessageView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:conv="clr-namespace:Anagramme.Converters;assembly=Anagramme.Common"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        mc:Ignorable="d" 
        d:DataContext="{d:DesignData Source=/SampleData/MessageViewModelSampleData.xaml}"
        Title="Anagramme" MinHeight="175" Height="175" Width="350" ShowInTaskbar="False" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" WindowStyle="ToolWindow" Topmost="True" Icon="/Anagramme.Common;component/Images/Icon.ico" >
    <Window.Resources>
        <conv:MessageBoxImageToUriConverter x:Key="MessageBoxImageToUriConverter"
                                            ErrorImageUrl="/Anagramme;component/Images/error.png"
                                            ExclamationImageUrl="/Anagramme;component/Images/exclamation.png"
                                            InformationImageUrl="/Anagramme;component/Images/information.png"
                                            QuestionImageUrl="/Anagramme;component/Images/question.png" />
    </Window.Resources>
    <Grid Margin="12" >
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions> 
        <Image VerticalAlignment="Center" HorizontalAlignment="Center" Width="64" Height="64"
               Source="{Binding Path=Icon, Converter={StaticResource ResourceKey=MessageBoxImageToUriConverter}}" />
        <TextBlock Grid.Column="1" VerticalAlignment="Center" Margin="5,0,0,0" Style="{DynamicResource Texte}"
                   TextWrapping="Wrap"
                   Text="{Binding Path=Text, Mode=OneTime}" />
        <Button Grid.Row="1" Grid.ColumnSpan="2" 
                Content="{Binding Path=Message.OK, Source={StaticResource ResourceKey=Resources}}"
                Command="{Binding Path=OkCommand, Mode=OneTime}" Style="{DynamicResource Button}" IsDefault="True" IsCancel="True" />
    </Grid>
</Window>
